package nnfe.userCenter.model;

<#--<#if hasCompositePk&&primeType!=toClassName>import com.bluemobi.ssm.model.${toClassName}Id;</#if>-->
import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;

/**
* @author: DGG-XAM3C create on ${.now}
* @Description: ${toClassName}实体类
*/
@Entity
@Table(name = "${name}")
public class ${toClassName} implements Serializable {
    <#if primeType!=toClassName>
    @Id
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    @GeneratedValue(generator = "system-uuid")
    private ${primeType} ${fieldPrime}; //
    </#if>
<#list fields as field>
    <#if field.name!=fieldPrime>
    @Column(name = "${field.name}")
    private ${field.javaType} ${field.toLabelName}; //${field.comment}
    </#if>
</#list>
<#if hasCompositePk && primeType!=toClassName>
<#--联合主键目前不处理-->
<#--public ${primeType} getPk(){-->
<#--return ${fieldPrime};-->
<#--}-->
<#--public void setPk(${primeType} ${fieldPrime}){-->
<#--this.${fieldPrime} = ${fieldPrime};-->
<#--}-->
<#else>
    <#list primtives as prikey>

    public ${prikey.javaType} get${prikey.toMethodName}() {
    return this.${prikey.name};
    }

    public void set${prikey.toMethodName}(${prikey.javaType} ${prikey.name}) {
    this.${prikey.name} = ${prikey.name};
    }
    </#list>
</#if>
<#list fields as field>
    <#if field.name!=fieldPrime>

    public ${field.javaType} get${field.toMethodName}() {
    return ${field.toLabelName};
    }

    public void set${field.toMethodName}(${field.javaType} ${field.toLabelName}) {
    this.${field.toLabelName} = ${field.toLabelName};
    }
    </#if>
</#list>
}
